import request from '@/utils/request'

// 查询招标专家关联列表
export function listBindExpert(query) {
  return request({
    url: '/purs/bindExpert/list',
    method: 'get',
    params: query
  })
}

// 查询招标专家关联详细
export function getBindExpert(bindExpertId) {
  return request({
    url: '/purs/bindExpert/' + bindExpertId,
    method: 'get'
  })
}

// 新增招标专家关联
export function addBindExpert(data) {
  return request({
    url: '/purs/bindExpert',
    method: 'post',
    data: data
  })
}

// 单个新增招标专家关联
export function insertBindExpert(data) {
  return request({
    url: '/purs/bindExpert/insertBindExpert',
    method: 'post',
    data: data
  })
}

// 修改招标专家关联
export function updateBindExpert(data) {
  return request({
    url: '/purs/bindExpert',
    method: 'put',
    data: data
  })
}

// 删除招标专家关联
export function delBindExpert(bindExpertId) {
  return request({
    url: '/purs/bindExpert/' + bindExpertId,
    method: 'delete'
  })
}


//通过专家编号删除关联
export function delBindExpertByExpertCode(expertCode) {
  return request({
    url: '/purs/bindExpert/delBindExpertByExpertCode/' + expertCode,
    method: 'get'
  })
}


//通过专家编号批量删除
export function delExpertBatch(codeBatch) {
  return request({
    url: '/purs/bindExpert/delExpertBatch/' + codeBatch,
    method: 'delete'
  })
}


//恢复初始化
export function clearExpertByBindCode(bindCode) {
  return request({
    url: '/purs/bindExpert/clearExpertByBindCode/' + bindCode,
    method: 'delete'
  })
}
